﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="FEIStorageSite.Admin.Default" MasterPageFile="~/admin/MasterPage.Master" %>
<%@ MasterType VirtualPath="~/admin/MasterPage.Master" %>

<asp:Content ID="categoriesPage" ContentPlaceHolderID="contentPanel" runat="server">
    <span class="title"><h3>Категорії</h3></span>
    <asp:Label CssClass="error" ID="categoriesPageError" runat="server"></asp:Label>    
        
    <asp:ListView ID="categoriesListView" runat="server" OnItemCommand="OnItemCommandOccured" >
        <LayoutTemplate>
            <table cellpadding="0" cellspacing="0" class="categoriesListAdmin">          
                <tr id="itemPlaceholder" runat="server"></tr>
                <tr>
                    <td></td>
                    <td><asp:TextBox ID="newNameTextBox" runat="server"></asp:TextBox></td>
                    <td colspan="2"><asp:ImageButton ID="addButton" ImageUrl="../images/add.gif" runat="server" CommandName="AddItem" /></td>
                </tr>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>(<%#Eval("CountFiles")%>)</td>
                <td><asp:TextBox ID="nameTextBox" runat="server" Text='<%#Eval("Name")%>'></asp:TextBox></td>
                <td><asp:ImageButton ID="updateButton" ImageUrl="../images/tick_on.png" runat="server" CommandName="UpdateItem" CommandArgument='<%#Eval("ID")%>' /></td>
                <td><asp:ImageButton ID="deleteButton" ImageUrl="../images/delete.gif" runat="server" CommandName="DeleteItem" CommandArgument='<%#Eval("ID")%>' /></td>
            </tr>              
        </ItemTemplate>
    </asp:ListView>    
</asp:Content>